package com.java.base.exercise.nettyproject;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * @Author RenPu
 * @Date 2022/1/17 16:26
 * @Version 1.0
 * @Description: Socket客户端     网络编程
 **/
public class SocketClient {

    public static void main(String[] args) throws IOException, ParseException {
//        Socket socketClient = new Socket();
//
//        OutputStream outputStream = socketClient.getOutputStream();
//
//        boolean autoflush = true;


        Date date = new Date();

        SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd");
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        String time="2022-01-21";
        Date parse = sdf.parse(time);
        System.out.println(date+"---------------");

        LocalDate localDate =  LocalDate.now();
        System.out.println(localDate+"**********************");



        if(parse.compareTo(date)<0){
            System.out.println("yes0............");
        }else {
            System.out.println("NO...............");
        }






    }



}
